package com.jswdwsx.esign.service

import com.jswdwsx.esign.entity.FlowTemplatePO
import com.jswdwsx.esign.repo.FlowTemplateRepository
import org.slf4j.LoggerFactory.getLogger
import org.springframework.data.repository.findByIdOrNull
import org.springframework.stereotype.Service


@Service
class FlowTemplateService(private val flowTemplateRepository: FlowTemplateRepository) {

    private val logger = getLogger(FlowTemplateService::class.java)

    fun save(flowTemplatePO: FlowTemplatePO): FlowTemplatePO {
        return flowTemplateRepository.save(flowTemplatePO)
    }

    fun getById(id: String): FlowTemplatePO? {
        return flowTemplateRepository.findByIdOrNull(id)
    }
}
